/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.chl.test.array;

import java.util.Arrays;
import java.util.Random;

/**
 *
 * @author 陈宏亮
 */
public class InitArray {

    public static void main(String[] args) {
        double[][] arr = new double[5][];
        Random r = new Random();
        for (int i = 0; i < arr.length; i++) {
            arr[i] = new double[]{r.nextDouble(), r.nextDouble()};
        }

        for (int i = 0; i < arr.length; i++) {
            System.out.println(Arrays.toString(arr[i]));
        }

        int l = 10;

        while (l-- > 0) {
            System.out.println(r.nextInt(10));
        }
        
        Object[] strs = toArray(new String[]{"33", "00"}, "1", "2");
        for (Object str : strs) {
            System.out.println(str);
        }
        //System.out.println(strs.length);
    }
    
    public static <T> T[] toArray(T... str) {
        return str;
    }
}
